<template>
	<view class="price" :style="{ color }">
		<text class="rmb">¥</text>
		<text class="bold">
			<text class="bold big">{{ _value.toFixed(2).split('.')[0] }}</text>.{{ _value.toFixed(2).split('.')[1] }}
		</text>
	</view>
</template>

<script>
export default {
	props: {
		value: Number,
		color: {
			type: String,
			default: '#333'
		}
	},
	computed: {
		_value() {
			return Number(this.value);
		}
	}
}
</script>

<style lang="scss" scoped>
.price {
	font-size: 30rpx;
	
	.rmb {
		font-size: 24rpx;
	}
	
	.big {
		font-size: 36rpx;
	}
}
</style>
